<div class="card">
  <div class="card-header">
    <%= t 'b.msg.flexible_content.edit_image' %>
  </div>

  <div class="card-block">
    <% if @model.file.present? %>
      <div class="row">
        <div class="col-lg-8 col-lg-offset-2">
          <%= image_tag(@model.file.url, alt: '', class: 'img-fluid') %>
        </div>
      </div>
    <% end %>

    <%= simple_form_for [:backend, @model] do |f| %>
      <%= f.input :file, as: :file %>
      <%= f.input :url, as: :string %>
      <%= f.input :caption, as: :text %>
      <%= render 'backend/form_actions', cancel_url: content_path %>
    <% end %>
  </div>
</div>
